<template>
    <!-- 查看发薪信息详情 -->
    <div id="paurollCompile">
        <!--btnArr：控制头部的文本以及数量。fn：传递给组件的函数  myIndex：按钮的索引 -->
        <operationPayrollTitle title="查看发薪信息详情" :btnArr="btnArr" :fn="goCompile" myIndex=0></operationPayrollTitle>
        <!-- starCss：控制*号的显示，myDisabled：控制表单是否禁用 --> 
        <operationPayrollForm :myDisabled="true" :starCss="{star:false}" :payrollData="lookData"></operationPayrollForm>
    </div>
</template>

<script>
// 头部
import operationPayrollTitle from './operationPayrollTitle'
// 表单
import operationPayrollForm from './operationPayrollForm'
// 请求数据
import {reqAccountInfo} from '../../request/payroll'
export default {
    components:{
        operationPayrollTitle,
        operationPayrollForm,
    },
    data() {
        return {
            btnArr:["编辑","信息修改记录"],   //控制头部的文本以及数量
            lookData:[]
        }
    },

    mounted() {
        // 请求数据列表
        reqAccountInfo().then(res=>{
            this.lookData = res[this.$store.state.payrollIndex]
        })
    },

    methods: {
        goCompile(){
            this.$router.push("/home/paurollCompile")
        }
    },
    
}
</script>

<style lang="less">
    #paurollCompile{
        background-color: #ffffff;
    }
</style>